package club.banyuan;

public class Main {

  public static void main(String[] args) {
    // write your code here
    var intList = new MyArrayList<Integer>();
    // list.add(一个元素); list.add(10);
    // list.remove(位置); 移除某个位置的元素
    var r = intList.add(10, 1);
    System.out.println(r);
    System.out.println(intList);
    for (int i = 0; i < 10; i++) {
      intList.add(i, i);
    }
    System.out.println(intList);
    for (int i = 0; i < 10; i++) {
      intList.add(i, 0);
    }
    System.out.println(intList);

    intList.remove(0);
    System.out.println(intList);
    System.out.println(intList.size());
    intList.remove(intList.size() - 1);
    System.out.println(intList);
    intList.remove(5);
    System.out.println(intList);
  }
}
